home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 80 / CD Actual 80 Julio-Agosto 2003.iso / Linux / LinuxGazette / lg / issue79 / misc / tougher / request.hpp.txt < prev    next >
Encoding:
Text File  |  2002-08-14  |  1.6 KB  |  72 lines

  1. //
  2. //
  3. // Copyright 2002 Rob Tougher <robt@robtougher.com>
  4. //
  5. // This file is part of xmlrpc.
  6. //
  7. // xmlrpc is free software; you can redistribute it and/or modify
  8. // it under the terms of the GNU General Public License as published by
  9. // the Free Software Foundation; either version 2 of the License, or
  10. // (at your option) any later version.
  11. //
  12. // xmlrpc is distributed in the hope that it will be useful,
  13. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. // GNU General Public License for more details.
  16. //
  17. // You should have received a copy of the GNU General Public License
  18. // along with xmlrpc; if not, write to the Free Software
  19. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20. //
  21. //
  22.  
  23.  
  24. // Definition of the request class
  25.  
  26. #ifndef _xmlrpc_request_class_
  27. #define _xmlrpc_request_class_
  28.  
  29. #include <string>
  30. #include <vector>
  31.  
  32. #include "xml.hpp"
  33. #include "param.hpp"
  34.  
  35. namespace xmlrpc
  36. {
  37.  
  38.   class request : public xml::persistable
  39.   {
  40.   public:
  41.  
  42.     request ( const std::string name = "" );
  43.     virtual ~request();
  44.  
  45.     //
  46.     // Methods you are interested in
  47.     //
  48.     std::string get_name() const { return m_name; }
  49.  
  50.     void add_param ( const param p ) { m_params.push_back ( p ); }
  51.     param get_param ( const std::string name ) const;
  52.  
  53.  
  54.  
  55.     //
  56.     // Methods used internally
  57.     // by the framework
  58.     //
  59.     virtual std::string get_xml() const;
  60.     virtual void load_xml ( const std::string );
  61.  
  62.     std::string terminator() const { return "abcdef_request_end_abcdef"; }
  63.  
  64.   private:
  65.  
  66.     std::vector<param> m_params;
  67.     std::string m_name;
  68.   };
  69. };
  70.  
  71. #endif
  72.